package com.kevin.S2SM.web.view;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.apache.struts2.ServletActionContext;

import com.opensymphony.xwork2.ActionSupport;

@SuppressWarnings("serial")
public abstract class GenericAction extends ActionSupport {

	private HttpServletRequest request;
	private HttpServletResponse response;

	public abstract String doExecute(HttpServletRequest req,
			HttpServletResponse res) throws Exception;

	@Override
	public String execute() throws Exception {

		try {

			this.request = ServletActionContext.getRequest();
			this.response = ServletActionContext.getResponse();

			return doExecute(this.request, this.response);

		} finally {

		}
	}
}
